import { post} from '../../http'
import store from '@/store'

//供应商报名
export const selectBiddingInfo=({
  bidId
})=>{
  return post('/FTKJWLHYPT/bidAdminister/selectBiddingInfo',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          bidId,
          userId: store.state.user.UserId_DX_H,
          creator: store.state.user.USERNAME_DX_H,
        }
      }
    }
  })
}

//供应商出价竞价
export const biddingInfoMethod=(SignUpAndBiddingVO)=>{
  return post('/FTKJWLHYPT/bidAdminister/biddingInfoMethod',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          SignUpAndBiddingVO,
          userId: store.state.user.UserId_DX_H,
          creator: store.state.user.USERNAME_DX_H,
        }
      }
    }
  })
}

//供应商取消竞价
export const delBiddingMethod=({
  bidId,
  biddingPrice,
  biddingStatus
})=>{
  return post('/FTKJWLHYPT/bidAdminister/delBiddingMethod',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          bidId,
          biddingPrice,
          biddingStatus,
          userId: store.state.user.UserId_DX_H,
          creator: store.state.user.USERNAME_DX_H,
          fltId: store.state.user.FLT_UUID_DX_H,
        }
      }
    }
  })
}

//供应商竞价信息查看
export const queryBiddingInfo=({
  sugarId
})=>{
  return post('/FTKJWLHYPT/bidAdminister/queryBiddingInfo',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          sugarId,
          userId: store.state.user.UserId_DX_H,
          creator: store.state.user.USERNAME_DX_H,
        }
      }
    }
  })
}

//供应商报价轮次信息查看
export const querybiddingInfoData=({
  biddingId
})=>{
  return post('/FTKJWLHYPT/bidAdminister/querybiddingInfoData',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          biddingId,
          userId: store.state.user.UserId_DX_H,
          creator: store.state.user.USERNAME_DX_H,
          fltId: store.state.user.FLT_UUID_DX_H,
          dptId:store.state.user.DPTID_DX_H,
        }
      }
    }
  })
}

//供应商竞价检查报价是否存在
export const haveBiddingPrice =({
  sugarId,
  bidId,
  biddingPrices
})=>{
  return post('/FTKJWLHYPT/bidAdminister/haveBiddingPrice',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          sugarId,
          bidId,
          biddingPrices,
          userId: store.state.user.UserId_DX_H,
          creator: store.state.user.USERNAME_DX_H,
        }
      }
    }
  })
}
